package com.ruoyi.procurementmanagement.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 供应商结算单对象 erp_supplier_settlement
 *
 * @author ruoyi
 * @date 2025-03-20
 */
public class ErpSupplierSettlement extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 结算单编号 */
    @Excel(name = "结算单编号")
    private String sn;

    /** 供应商id */
    @Excel(name = "供应商id")
    private Long supplierId;

    /** 供应商名称 */
    @Excel(name = "供应商名称")
    private String supplierName;

    /** 结算开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结算开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 结算结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结算结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 合计金额 */
    @Excel(name = "合计金额")
    private BigDecimal totalPrice;

    /** 创建者 */
    @Excel(name = "创建者")
    private String creator;

    /** 更新者 */
    @Excel(name = "更新者")
    private String updater;

    /** 状态 */
    @Excel(name = "状态")
    private int start;

    // 在 ErpSupplierSettlement.java 中添加关联入库单的列表
    private List<ErpWarehouseEntry> entryList;

    // 在ErpSupplierSettlement.java中添加status属性和getter/setter方法
    private String status;

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    // 非数据库字段，用于接收前端传入的入库单ID列表
    private List<Long> entryIds;

    public List<Long> getEntryIds() {
        return entryIds;
    }

    public void setEntryIds(List<Long> entryIds) {
        this.entryIds = entryIds;
    }

    public List<ErpWarehouseEntry> getEntryList() {
        return entryList;
    }

    public void setEntryList(List<ErpWarehouseEntry> entryList) {
        this.entryList = entryList;
    }

    public int getStart() {
        return start;
    }

    public void setStart(int start) {
        this.start = start;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setSn(String sn)
    {
        this.sn = sn;
    }

    public String getSn()
    {
        return sn;
    }
    public void setSupplierId(Long supplierId)
    {
        this.supplierId = supplierId;
    }

    public Long getSupplierId()
    {
        return supplierId;
    }
    public void setSupplierName(String supplierName)
    {
        this.supplierName = supplierName;
    }

    public String getSupplierName()
    {
        return supplierName;
    }
    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime()
    {
        return startTime;
    }
    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }
    public void setTotalPrice(BigDecimal totalPrice)
    {
        this.totalPrice = totalPrice;
    }

    public BigDecimal getTotalPrice()
    {
        return totalPrice;
    }
    public void setCreator(String creator)
    {
        this.creator = creator;
    }

    public String getCreator()
    {
        return creator;
    }
    public void setUpdater(String updater)
    {
        this.updater = updater;
    }

    public String getUpdater()
    {
        return updater;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("sn", getSn())
            .append("supplierId", getSupplierId())
            .append("supplierName", getSupplierName())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("totalPrice", getTotalPrice())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("creator", getCreator())
            .append("updater", getUpdater())
                .append("start", getStart())
                .append("entryList", getEntryList())
            .toString();
    }
}
